var toString = Object.prototype.toString;

var isType = function(type){
    return function(obj){
        return toString.call(obj) == '[object '+type+']';
    };
};

var isString = isType('String');
var isFunction = isType('Function');

console.log(isString('aaaa'));
console.log(isFunction(toString));

var target = function(){
    console.log('i execute done');
}

var after =  function(times,func){
    if(times<=0) return func();
    return function(){
        if(--times<1) {
            return func.apply(this,arguments);
        }
    };
};
